<!DOCTYPE html>
<html lang="en">
<head>
    {include file="_public/_head"/}
    <style>body { background: url("/public/images/bg3.png") no-repeat; background-size: 100%; background-attachment: fixed; }</style>
</head>
<body>
{include file="_public/_header"/}
<div style="height: 1.6em"></div>
<div class="am-g am-g-fixed blog-g-fixed">
    <div class="am-u-md-8 am-panel">
        <h3 class="am-article-title blog-title">
            <a href="">{$detail.name}</a>
        </h3>
        <div class="am-g blog-content-list">
            <a href="/scenery/{$detail.id}.html">
                <div class="am-u-lg-5">
                    <p class="news-pic"><img src="{$detail.pic_url}">
                    </p>
                </div>
                <div class="am-u-lg-7">
                    <p>票价：{$detail.price}</p>
                    <p>地理位置：{$detail.address}</p>
                    <p>百科链接：<a style="color: #0ba4ea;" href="{$detail.url}" target="_blank">网页链接</a></p>
                    <p>标签：
                        {volist name="detail.label" id="label"}
                        <span class="am-badge am-round">{$label}</span>
                        {/volist}
                </div>
            </a>
        </div>

        <ul class="am-tabs-nav am-nav am-nav-tabs" id="nav">
            <li class="am-active"><a data-href="#tab1">景点介绍</a></li>
            <li><a data-href="#tab2">地图信息</a></li>
            <li><a data-href="#tab3">交通方式</a></li>
            <li><a data-href="#tab4">景点新闻</a></li>
        </ul>
        <div class="blog-main" id="tab1">
            <div class="am-g blog-content">
                <div class="am-u-lg-12">
                    <article>{$detail.introduce}</article>
                </div>
            </div>
        </div>
        <div class="blog-main" id="tab2" style="display:none">
            <hr/>
            <div class="am-u-lg-12" id="map" style="height: 300px;"></div>
            <p style="clear: both"></p>
        </div>
        <div class="blog-main" id="tab3" style="display:none">
            <hr/>
            <article>{$detail.traffic}</article>
        </div>
        <div class="blog-main" id="tab4" style="display:none">
            <hr/>
            <ul class="am-comments-list">
                {volist name="detail.news_list" id="vo"}
                <li class="am-comment">
                    {if condition="7 eq $vo['type']"}
                    <a href="{$vo.url}">
                        <p class="am-comment-avatar pic-title">{:mb_substr($vo['author'] , 0 , 1, 'utf-8')}</p>
                    </a>
                    {else/}
                    <a href="/news/{$vo.id}.html">
                        <p class="am-comment-avatar pic-title">{:mb_substr($vo['author'] , 0 , 1, 'utf-8')}</p>
                    </a>
                    {/if}
                    <div class="am-comment-main">
                        <header class="am-comment-hd">
                            <div class="am-comment-meta">
                                {if condition="7 eq $vo['type']"}
                                <a href="{$vo.url}" class="am-comment-author">《{$vo.title}》</a> {$vo.author} <time>{:date('Y-m-d',$vo['created_at'])}</time>
                                {else/}
                                <a href="/news/{$vo.id}.html" class="am-comment-author">《{$vo.title}》</a> {$vo.author} <time>{:date('Y-m-d',$vo['created_at'])}</time>
                                {/if}
                            </div>
                        </header>
                        <div class="am-comment-bd">
                            <p>{$vo.description}</p>
                        </div>
                    </div>
                </li>
                {/volist}
            </ul>
        </div>
        <hr style="margin:0;">
        <ul class="am-pagination blog-pagination">
            {if condition="empty($detail['pre_id'])"}
            <li class="am-pagination-prev"><span>&laquo; 上一页</span></li>
            {else /}
            <li class="am-pagination-prev"><a href="/scenery/{$detail.pre_id}.html">&laquo; 上一页</a></li>
            {/if}
            {if condition="empty($detail['next_id'])"}
            <li class="am-pagination-next"><span>下一页 &raquo;</span></li>
            {else /}
            <li class="am-pagination-next"><a href="/scenery/{$detail.next_id}.html">下一页 &raquo;</a></li>
            {/if}
        </ul>
    </div>
    {include file="_public/_sidebar"/}
</div>
{include file="_public/_footer"/}
<script type="text/javascript" src="https://api.map.baidu.com/api?v=2.0&ak=24241234"></script>
<script>
    $(function () {
        var map = new BMap.Map("map");
        var address_latitude = '{$detail.address_latitude}';
        var address_longitude = '{$detail.address_longitude}';
        map.centerAndZoom(new BMap.Point(address_longitude, address_latitude), 15);  // 初始化地图,设置中心点坐标和地图级别
        //添加地图类型控件
        map.addControl(new BMap.MapTypeControl({
            mapTypes: [
                BMAP_NORMAL_MAP,
                BMAP_HYBRID_MAP
            ]
        }));
        map.setCurrentCity("北京");          // 设置地图显示的城市 此项是必须设置的
        map.enableScrollWheelZoom(true);     //开启鼠标滚轮缩放
        $('#nav').find('li').on('click', function () {
            $('#nav').find('.am-active').removeClass('am-active');
            $(this).addClass('am-active');
            var tab = $(this).find('a').data('href');
            $('.blog-main').hide();
            $("" + tab + "").show();
        });
    })
</script>
</body>
</html>